# -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS
Community Edition) available.
Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
You may obtain a copy of the License at http://opensource.org/licenses/MIT
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
"""

#
# Autogenerated by Thrift Compiler (0.10.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
#  options string: py
#

from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
from thrift.protocol.TProtocol import TProtocolException
import sys

from thrift.transport import TTransport


class CacheHost(object):
    """
    Attributes:
     - bzId
     - ip
     - platId
    """

    thrift_spec = (
        None,  # 0
        (
            1,
            TType.STRING,
            "bzId",
            "UTF8",
            None,
        ),  # 1
        (
            2,
            TType.STRING,
            "ip",
            "UTF8",
            None,
        ),  # 2
        (
            3,
            TType.STRING,
            "platId",
            "UTF8",
            None,
        ),  # 3
    )

    def __init__(
        self,
        bzId=None,
        ip=None,
        platId=None,
    ):
        self.bzId = bzId
        self.ip = ip
        self.platId = platId

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.bzId = iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.ip = iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.platId = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin("CacheHost")
        if self.bzId is not None:
            oprot.writeFieldBegin("bzId", TType.STRING, 1)
            oprot.writeString(self.bzId.encode("utf-8") if sys.version_info[0] == 2 else self.bzId)
            oprot.writeFieldEnd()
        if self.ip is not None:
            oprot.writeFieldBegin("ip", TType.STRING, 2)
            oprot.writeString(self.ip.encode("utf-8") if sys.version_info[0] == 2 else self.ip)
            oprot.writeFieldEnd()
        if self.platId is not None:
            oprot.writeFieldBegin("platId", TType.STRING, 3)
            oprot.writeString(self.platId.encode("utf-8") if sys.version_info[0] == 2 else self.platId)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()]
        return "%s(%s)" % (self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class CacheUser(object):
    """
    Attributes:
     - user
     - password
    """

    thrift_spec = (
        None,  # 0
        (
            1,
            TType.STRING,
            "user",
            "UTF8",
            None,
        ),  # 1
        (
            2,
            TType.STRING,
            "password",
            "UTF8",
            None,
        ),  # 2
    )

    def __init__(
        self,
        user=None,
        password=None,
    ):
        self.user = user
        self.password = password

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.user = iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.password = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin("CacheUser")
        if self.user is not None:
            oprot.writeFieldBegin("user", TType.STRING, 1)
            oprot.writeString(self.user.encode("utf-8") if sys.version_info[0] == 2 else self.user)
            oprot.writeFieldEnd()
        if self.password is not None:
            oprot.writeFieldBegin("password", TType.STRING, 2)
            oprot.writeString(self.password.encode("utf-8") if sys.version_info[0] == 2 else self.password)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()]
        return "%s(%s)" % (self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class CacheIpInfo(object):
    """
    Attributes:
     - platId
     - ip
    """

    thrift_spec = (
        None,  # 0
        (
            1,
            TType.STRING,
            "platId",
            "UTF8",
            None,
        ),  # 1
        (
            2,
            TType.STRING,
            "ip",
            "UTF8",
            None,
        ),  # 2
    )

    def __init__(
        self,
        platId=None,
        ip=None,
    ):
        self.platId = platId
        self.ip = ip

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.platId = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.ip = iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin("CacheIpInfo")
        if self.platId is not None:
            oprot.writeFieldBegin("platId", TType.STRING, 1)
            oprot.writeString(self.platId.encode("utf-8") if sys.version_info[0] == 2 else self.platId)
            oprot.writeFieldEnd()
        if self.ip is not None:
            oprot.writeFieldBegin("ip", TType.STRING, 2)
            oprot.writeString(self.ip.encode("utf-8") if sys.version_info[0] == 2 else self.ip)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()]
        return "%s(%s)" % (self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class RequestInfo(object):
    """
    Attributes:
     - bzId
     - platId
     - ips
     - user
     - subtype
    """

    thrift_spec = (
        None,  # 0
        (
            1,
            TType.STRING,
            "bzId",
            "UTF8",
            None,
        ),  # 1
        (
            2,
            TType.STRING,
            "platId",
            "UTF8",
            None,
        ),  # 2
        (
            3,
            TType.LIST,
            "ips",
            (TType.STRING, "UTF8", False),
            None,
        ),  # 3
        (
            4,
            TType.STRUCT,
            "user",
            (CacheUser, CacheUser.thrift_spec),
            None,
        ),  # 4
        (
            5,
            TType.STRING,
            "subtype",
            "UTF8",
            "0",
        ),  # 5
    )

    def __init__(
        self,
        bzId=None,
        platId=None,
        ips=None,
        user=None,
        subtype=thrift_spec[5][4],
    ):
        self.bzId = bzId
        self.platId = platId
        self.ips = ips
        self.user = user
        self.subtype = subtype

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.bzId = iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.platId = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.ips = []
                    (_etype3, _size0) = iprot.readListBegin()
                    for _i4 in range(_size0):
                        _elem5 = iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                        self.ips.append(_elem5)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRUCT:
                    self.user = CacheUser()
                    self.user.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.subtype = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin("RequestInfo")
        if self.bzId is not None:
            oprot.writeFieldBegin("bzId", TType.STRING, 1)
            oprot.writeString(self.bzId.encode("utf-8") if sys.version_info[0] == 2 else self.bzId)
            oprot.writeFieldEnd()
        if self.platId is not None:
            oprot.writeFieldBegin("platId", TType.STRING, 2)
            oprot.writeString(self.platId.encode("utf-8") if sys.version_info[0] == 2 else self.platId)
            oprot.writeFieldEnd()
        if self.ips is not None:
            oprot.writeFieldBegin("ips", TType.LIST, 3)
            oprot.writeListBegin(TType.STRING, len(self.ips))
            for iter6 in self.ips:
                oprot.writeString(iter6.encode("utf-8") if sys.version_info[0] == 2 else iter6)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.user is not None:
            oprot.writeFieldBegin("user", TType.STRUCT, 4)
            self.user.write(oprot)
            oprot.writeFieldEnd()
        if self.subtype is not None:
            oprot.writeFieldBegin("subtype", TType.STRING, 5)
            oprot.writeString(self.subtype.encode("utf-8") if sys.version_info[0] == 2 else self.subtype)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()]
        return "%s(%s)" % (self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class AgentStatusRequestInfo(object):
    """
    Attributes:
     - user
     - ipinfos
     - bzId
    """

    thrift_spec = (
        None,  # 0
        (
            1,
            TType.STRUCT,
            "user",
            (CacheUser, CacheUser.thrift_spec),
            None,
        ),  # 1
        (
            2,
            TType.LIST,
            "ipinfos",
            (TType.STRUCT, (CacheIpInfo, CacheIpInfo.thrift_spec), False),
            None,
        ),  # 2
        (
            3,
            TType.STRING,
            "bzId",
            "UTF8",
            None,
        ),  # 3
    )

    def __init__(
        self,
        user=None,
        ipinfos=None,
        bzId=None,
    ):
        self.user = user
        self.ipinfos = ipinfos
        self.bzId = bzId

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.user = CacheUser()
                    self.user.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.ipinfos = []
                    (_etype10, _size7) = iprot.readListBegin()
                    for _i11 in range(_size7):
                        _elem12 = CacheIpInfo()
                        _elem12.read(iprot)
                        self.ipinfos.append(_elem12)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.bzId = iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin("AgentStatusRequestInfo")
        if self.user is not None:
            oprot.writeFieldBegin("user", TType.STRUCT, 1)
            self.user.write(oprot)
            oprot.writeFieldEnd()
        if self.ipinfos is not None:
            oprot.writeFieldBegin("ipinfos", TType.LIST, 2)
            oprot.writeListBegin(TType.STRUCT, len(self.ipinfos))
            for iter13 in self.ipinfos:
                iter13.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.bzId is not None:
            oprot.writeFieldBegin("bzId", TType.STRING, 3)
            oprot.writeString(self.bzId.encode("utf-8") if sys.version_info[0] == 2 else self.bzId)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()]
        return "%s(%s)" % (self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class AgentStatusInfo(object):
    """
    Attributes:
     - ip
     - ver
     - platId
     - firstInsertTime
     - heartTime
     - isExist
    """

    thrift_spec = (
        None,  # 0
        (
            1,
            TType.STRING,
            "ip",
            "UTF8",
            None,
        ),  # 1
        (
            2,
            TType.STRING,
            "ver",
            "UTF8",
            None,
        ),  # 2
        (
            3,
            TType.STRING,
            "platId",
            "UTF8",
            None,
        ),  # 3
        (
            4,
            TType.STRING,
            "firstInsertTime",
            "UTF8",
            None,
        ),  # 4
        (
            5,
            TType.STRING,
            "heartTime",
            "UTF8",
            None,
        ),  # 5
        (
            6,
            TType.I32,
            "isExist",
            None,
            None,
        ),  # 6
    )

    def __init__(
        self,
        ip=None,
        ver=None,
        platId=None,
        firstInsertTime=None,
        heartTime=None,
        isExist=None,
    ):
        self.ip = ip
        self.ver = ver
        self.platId = platId
        self.firstInsertTime = firstInsertTime
        self.heartTime = heartTime
        self.isExist = isExist

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.ip = iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.ver = iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.platId = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.firstInsertTime = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.heartTime = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.I32:
                    self.isExist = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin("AgentStatusInfo")
        if self.ip is not None:
            oprot.writeFieldBegin("ip", TType.STRING, 1)
            oprot.writeString(self.ip.encode("utf-8") if sys.version_info[0] == 2 else self.ip)
            oprot.writeFieldEnd()
        if self.ver is not None:
            oprot.writeFieldBegin("ver", TType.STRING, 2)
            oprot.writeString(self.ver.encode("utf-8") if sys.version_info[0] == 2 else self.ver)
            oprot.writeFieldEnd()
        if self.platId is not None:
            oprot.writeFieldBegin("platId", TType.STRING, 3)
            oprot.writeString(self.platId.encode("utf-8") if sys.version_info[0] == 2 else self.platId)
            oprot.writeFieldEnd()
        if self.firstInsertTime is not None:
            oprot.writeFieldBegin("firstInsertTime", TType.STRING, 4)
            oprot.writeString(
                self.firstInsertTime.encode("utf-8") if sys.version_info[0] == 2 else self.firstInsertTime
            )
            oprot.writeFieldEnd()
        if self.heartTime is not None:
            oprot.writeFieldBegin("heartTime", TType.STRING, 5)
            oprot.writeString(self.heartTime.encode("utf-8") if sys.version_info[0] == 2 else self.heartTime)
            oprot.writeFieldEnd()
        if self.isExist is not None:
            oprot.writeFieldBegin("isExist", TType.I32, 6)
            oprot.writeI32(self.isExist)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()]
        return "%s(%s)" % (self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class AgentStatusResponse(object):
    """
    Attributes:
     - user
     - result
     - errCode
     - errMsg
     - bzId
    """

    thrift_spec = (
        None,  # 0
        (
            1,
            TType.STRUCT,
            "user",
            (CacheUser, CacheUser.thrift_spec),
            None,
        ),  # 1
        (
            2,
            TType.MAP,
            "result",
            (TType.STRING, "UTF8", TType.STRING, "UTF8", False),
            None,
        ),  # 2
        (
            3,
            TType.I32,
            "errCode",
            None,
            None,
        ),  # 3
        (
            4,
            TType.STRING,
            "errMsg",
            "UTF8",
            None,
        ),  # 4
        (
            5,
            TType.STRING,
            "bzId",
            "UTF8",
            None,
        ),  # 5
    )

    def __init__(
        self,
        user=None,
        result=None,
        errCode=None,
        errMsg=None,
        bzId=None,
    ):
        self.user = user
        self.result = result
        self.errCode = errCode
        self.errMsg = errMsg
        self.bzId = bzId

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.user = CacheUser()
                    self.user.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.MAP:
                    self.result = {}
                    (_ktype15, _vtype16, _size14) = iprot.readMapBegin()
                    for _i18 in range(_size14):
                        _key19 = iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                        _val20 = iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                        self.result[_key19] = _val20
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.errCode = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.errMsg = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.bzId = iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin("AgentStatusResponse")
        if self.user is not None:
            oprot.writeFieldBegin("user", TType.STRUCT, 1)
            self.user.write(oprot)
            oprot.writeFieldEnd()
        if self.result is not None:
            oprot.writeFieldBegin("result", TType.MAP, 2)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.result))
            for kiter21, viter22 in self.result.items():
                oprot.writeString(kiter21.encode("utf-8") if sys.version_info[0] == 2 else kiter21)
                oprot.writeString(viter22.encode("utf-8") if sys.version_info[0] == 2 else viter22)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.errCode is not None:
            oprot.writeFieldBegin("errCode", TType.I32, 3)
            oprot.writeI32(self.errCode)
            oprot.writeFieldEnd()
        if self.errMsg is not None:
            oprot.writeFieldBegin("errMsg", TType.STRING, 4)
            oprot.writeString(self.errMsg.encode("utf-8") if sys.version_info[0] == 2 else self.errMsg)
            oprot.writeFieldEnd()
        if self.bzId is not None:
            oprot.writeFieldBegin("bzId", TType.STRING, 5)
            oprot.writeString(self.bzId.encode("utf-8") if sys.version_info[0] == 2 else self.bzId)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()]
        return "%s(%s)" % (self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ResponseInfo(object):
    """
    Attributes:
     - errCode
     - errMsg
     - result
     - bzId
     - platId
    """

    thrift_spec = (
        None,  # 0
        (
            1,
            TType.I32,
            "errCode",
            None,
            None,
        ),  # 1
        (
            2,
            TType.STRING,
            "errMsg",
            "UTF8",
            None,
        ),  # 2
        (
            3,
            TType.MAP,
            "result",
            (TType.STRING, "UTF8", TType.STRING, "UTF8", False),
            None,
        ),  # 3
        (
            4,
            TType.STRING,
            "bzId",
            "UTF8",
            None,
        ),  # 4
        (
            5,
            TType.STRING,
            "platId",
            "UTF8",
            None,
        ),  # 5
    )

    def __init__(
        self,
        errCode=None,
        errMsg=None,
        result=None,
        bzId=None,
        platId=None,
    ):
        self.errCode = errCode
        self.errMsg = errMsg
        self.result = result
        self.bzId = bzId
        self.platId = platId

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.errCode = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.errMsg = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    self.result = {}
                    (_ktype24, _vtype25, _size23) = iprot.readMapBegin()
                    for _i27 in range(_size23):
                        _key28 = iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                        _val29 = iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                        self.result[_key28] = _val29
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.bzId = iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.platId = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin("ResponseInfo")
        if self.errCode is not None:
            oprot.writeFieldBegin("errCode", TType.I32, 1)
            oprot.writeI32(self.errCode)
            oprot.writeFieldEnd()
        if self.errMsg is not None:
            oprot.writeFieldBegin("errMsg", TType.STRING, 2)
            oprot.writeString(self.errMsg.encode("utf-8") if sys.version_info[0] == 2 else self.errMsg)
            oprot.writeFieldEnd()
        if self.result is not None:
            oprot.writeFieldBegin("result", TType.MAP, 3)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.result))
            for kiter30, viter31 in self.result.items():
                oprot.writeString(kiter30.encode("utf-8") if sys.version_info[0] == 2 else kiter30)
                oprot.writeString(viter31.encode("utf-8") if sys.version_info[0] == 2 else viter31)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.bzId is not None:
            oprot.writeFieldBegin("bzId", TType.STRING, 4)
            oprot.writeString(self.bzId.encode("utf-8") if sys.version_info[0] == 2 else self.bzId)
            oprot.writeFieldEnd()
        if self.platId is not None:
            oprot.writeFieldBegin("platId", TType.STRING, 5)
            oprot.writeString(self.platId.encode("utf-8") if sys.version_info[0] == 2 else self.platId)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()]
        return "%s(%s)" % (self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class MultipleBzIdIp(object):
    """
    Attributes:
     - mulBzidIps
     - user
    """

    thrift_spec = (
        None,  # 0
        (
            1,
            TType.LIST,
            "mulBzidIps",
            (TType.STRUCT, (CacheHost, CacheHost.thrift_spec), False),
            None,
        ),  # 1
        (
            2,
            TType.STRUCT,
            "user",
            (CacheUser, CacheUser.thrift_spec),
            None,
        ),  # 2
    )

    def __init__(
        self,
        mulBzidIps=None,
        user=None,
    ):
        self.mulBzidIps = mulBzidIps
        self.user = user

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.LIST:
                    self.mulBzidIps = []
                    (_etype35, _size32) = iprot.readListBegin()
                    for _i36 in range(_size32):
                        _elem37 = CacheHost()
                        _elem37.read(iprot)
                        self.mulBzidIps.append(_elem37)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.user = CacheUser()
                    self.user.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin("MultipleBzIdIp")
        if self.mulBzidIps is not None:
            oprot.writeFieldBegin("mulBzidIps", TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.mulBzidIps))
            for iter38 in self.mulBzidIps:
                iter38.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.user is not None:
            oprot.writeFieldBegin("user", TType.STRUCT, 2)
            self.user.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()]
        return "%s(%s)" % (self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class MultiResponse(object):
    """
    Attributes:
     - errCode
     - errMsg
     - result
    """

    thrift_spec = (
        None,  # 0
        (
            1,
            TType.I32,
            "errCode",
            None,
            None,
        ),  # 1
        (
            2,
            TType.STRING,
            "errMsg",
            "UTF8",
            None,
        ),  # 2
        (
            3,
            TType.MAP,
            "result",
            (TType.STRING, "UTF8", TType.STRING, "UTF8", False),
            None,
        ),  # 3
    )

    def __init__(
        self,
        errCode=None,
        errMsg=None,
        result=None,
    ):
        self.errCode = errCode
        self.errMsg = errMsg
        self.result = result

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.errCode = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.errMsg = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    self.result = {}
                    (_ktype40, _vtype41, _size39) = iprot.readMapBegin()
                    for _i43 in range(_size39):
                        _key44 = iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                        _val45 = iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                        self.result[_key44] = _val45
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin("MultiResponse")
        if self.errCode is not None:
            oprot.writeFieldBegin("errCode", TType.I32, 1)
            oprot.writeI32(self.errCode)
            oprot.writeFieldEnd()
        if self.errMsg is not None:
            oprot.writeFieldBegin("errMsg", TType.STRING, 2)
            oprot.writeString(self.errMsg.encode("utf-8") if sys.version_info[0] == 2 else self.errMsg)
            oprot.writeFieldEnd()
        if self.result is not None:
            oprot.writeFieldBegin("result", TType.MAP, 3)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.result))
            for kiter46, viter47 in self.result.items():
                oprot.writeString(kiter46.encode("utf-8") if sys.version_info[0] == 2 else kiter46)
                oprot.writeString(viter47.encode("utf-8") if sys.version_info[0] == 2 else viter47)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()]
        return "%s(%s)" % (self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class LostAgentInfo(object):
    """
    Attributes:
     - startTime
     - endTime
     - businessId
     - platId
     - usr
    """

    thrift_spec = (
        None,  # 0
        (
            1,
            TType.STRING,
            "startTime",
            "UTF8",
            None,
        ),  # 1
        (
            2,
            TType.STRING,
            "endTime",
            "UTF8",
            None,
        ),  # 2
        (
            3,
            TType.STRING,
            "businessId",
            "UTF8",
            None,
        ),  # 3
        (
            4,
            TType.STRING,
            "platId",
            "UTF8",
            None,
        ),  # 4
        (
            5,
            TType.STRUCT,
            "usr",
            (CacheUser, CacheUser.thrift_spec),
            None,
        ),  # 5
    )

    def __init__(
        self,
        startTime=None,
        endTime=None,
        businessId=None,
        platId=None,
        usr=None,
    ):
        self.startTime = startTime
        self.endTime = endTime
        self.businessId = businessId
        self.platId = platId
        self.usr = usr

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.startTime = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.endTime = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.businessId = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.platId = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRUCT:
                    self.usr = CacheUser()
                    self.usr.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin("LostAgentInfo")
        if self.startTime is not None:
            oprot.writeFieldBegin("startTime", TType.STRING, 1)
            oprot.writeString(self.startTime.encode("utf-8") if sys.version_info[0] == 2 else self.startTime)
            oprot.writeFieldEnd()
        if self.endTime is not None:
            oprot.writeFieldBegin("endTime", TType.STRING, 2)
            oprot.writeString(self.endTime.encode("utf-8") if sys.version_info[0] == 2 else self.endTime)
            oprot.writeFieldEnd()
        if self.businessId is not None:
            oprot.writeFieldBegin("businessId", TType.STRING, 3)
            oprot.writeString(self.businessId.encode("utf-8") if sys.version_info[0] == 2 else self.businessId)
            oprot.writeFieldEnd()
        if self.platId is not None:
            oprot.writeFieldBegin("platId", TType.STRING, 4)
            oprot.writeString(self.platId.encode("utf-8") if sys.version_info[0] == 2 else self.platId)
            oprot.writeFieldEnd()
        if self.usr is not None:
            oprot.writeFieldBegin("usr", TType.STRUCT, 5)
            self.usr.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()]
        return "%s(%s)" % (self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class LostAgentResponse(object):
    """
    Attributes:
     - errCode
     - errMsg
     - businessId
     - result
     - platId
    """

    thrift_spec = (
        None,  # 0
        (
            1,
            TType.I32,
            "errCode",
            None,
            None,
        ),  # 1
        (
            2,
            TType.STRING,
            "errMsg",
            "UTF8",
            None,
        ),  # 2
        (
            3,
            TType.STRING,
            "businessId",
            "UTF8",
            None,
        ),  # 3
        (
            4,
            TType.MAP,
            "result",
            (TType.STRING, "UTF8", TType.STRING, "UTF8", False),
            None,
        ),  # 4
        (
            5,
            TType.STRING,
            "platId",
            "UTF8",
            None,
        ),  # 5
    )

    def __init__(
        self,
        errCode=None,
        errMsg=None,
        businessId=None,
        result=None,
        platId=None,
    ):
        self.errCode = errCode
        self.errMsg = errMsg
        self.businessId = businessId
        self.result = result
        self.platId = platId

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.errCode = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.errMsg = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.businessId = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.MAP:
                    self.result = {}
                    (_ktype49, _vtype50, _size48) = iprot.readMapBegin()
                    for _i52 in range(_size48):
                        _key53 = iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                        _val54 = iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                        self.result[_key53] = _val54
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.platId = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin("LostAgentResponse")
        if self.errCode is not None:
            oprot.writeFieldBegin("errCode", TType.I32, 1)
            oprot.writeI32(self.errCode)
            oprot.writeFieldEnd()
        if self.errMsg is not None:
            oprot.writeFieldBegin("errMsg", TType.STRING, 2)
            oprot.writeString(self.errMsg.encode("utf-8") if sys.version_info[0] == 2 else self.errMsg)
            oprot.writeFieldEnd()
        if self.businessId is not None:
            oprot.writeFieldBegin("businessId", TType.STRING, 3)
            oprot.writeString(self.businessId.encode("utf-8") if sys.version_info[0] == 2 else self.businessId)
            oprot.writeFieldEnd()
        if self.result is not None:
            oprot.writeFieldBegin("result", TType.MAP, 4)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.result))
            for kiter55, viter56 in self.result.items():
                oprot.writeString(kiter55.encode("utf-8") if sys.version_info[0] == 2 else kiter55)
                oprot.writeString(viter56.encode("utf-8") if sys.version_info[0] == 2 else viter56)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.platId is not None:
            oprot.writeFieldBegin("platId", TType.STRING, 5)
            oprot.writeString(self.platId.encode("utf-8") if sys.version_info[0] == 2 else self.platId)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()]
        return "%s(%s)" % (self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class CacheHistoryInfo(object):
    """
    Attributes:
     - platId
     - bzId
     - starttime
     - endtime
     - ips
     - user
     - subtype
    """

    thrift_spec = (
        None,  # 0
        (
            1,
            TType.STRING,
            "platId",
            "UTF8",
            None,
        ),  # 1
        (
            2,
            TType.STRING,
            "bzId",
            "UTF8",
            None,
        ),  # 2
        (
            3,
            TType.STRING,
            "starttime",
            "UTF8",
            None,
        ),  # 3
        (
            4,
            TType.STRING,
            "endtime",
            "UTF8",
            None,
        ),  # 4
        (
            5,
            TType.LIST,
            "ips",
            (TType.STRING, "UTF8", False),
            None,
        ),  # 5
        (
            6,
            TType.STRUCT,
            "user",
            (CacheUser, CacheUser.thrift_spec),
            None,
        ),  # 6
        (
            7,
            TType.STRING,
            "subtype",
            "UTF8",
            "0",
        ),  # 7
    )

    def __init__(
        self,
        platId=None,
        bzId=None,
        starttime=None,
        endtime=None,
        ips=None,
        user=None,
        subtype=thrift_spec[7][4],
    ):
        self.platId = platId
        self.bzId = bzId
        self.starttime = starttime
        self.endtime = endtime
        self.ips = ips
        self.user = user
        self.subtype = subtype

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.platId = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.bzId = iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.starttime = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.endtime = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.LIST:
                    self.ips = []
                    (_etype60, _size57) = iprot.readListBegin()
                    for _i61 in range(_size57):
                        _elem62 = (
                            iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                        )
                        self.ips.append(_elem62)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRUCT:
                    self.user = CacheUser()
                    self.user.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.STRING:
                    self.subtype = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin("CacheHistoryInfo")
        if self.platId is not None:
            oprot.writeFieldBegin("platId", TType.STRING, 1)
            oprot.writeString(self.platId.encode("utf-8") if sys.version_info[0] == 2 else self.platId)
            oprot.writeFieldEnd()
        if self.bzId is not None:
            oprot.writeFieldBegin("bzId", TType.STRING, 2)
            oprot.writeString(self.bzId.encode("utf-8") if sys.version_info[0] == 2 else self.bzId)
            oprot.writeFieldEnd()
        if self.starttime is not None:
            oprot.writeFieldBegin("starttime", TType.STRING, 3)
            oprot.writeString(self.starttime.encode("utf-8") if sys.version_info[0] == 2 else self.starttime)
            oprot.writeFieldEnd()
        if self.endtime is not None:
            oprot.writeFieldBegin("endtime", TType.STRING, 4)
            oprot.writeString(self.endtime.encode("utf-8") if sys.version_info[0] == 2 else self.endtime)
            oprot.writeFieldEnd()
        if self.ips is not None:
            oprot.writeFieldBegin("ips", TType.LIST, 5)
            oprot.writeListBegin(TType.STRING, len(self.ips))
            for iter63 in self.ips:
                oprot.writeString(iter63.encode("utf-8") if sys.version_info[0] == 2 else iter63)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.user is not None:
            oprot.writeFieldBegin("user", TType.STRUCT, 6)
            self.user.write(oprot)
            oprot.writeFieldEnd()
        if self.subtype is not None:
            oprot.writeFieldBegin("subtype", TType.STRING, 7)
            oprot.writeString(self.subtype.encode("utf-8") if sys.version_info[0] == 2 else self.subtype)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()]
        return "%s(%s)" % (self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class ProxyInfo(object):
    """
    Attributes:
     - innerIp
     - outerIp
     - action
    """

    thrift_spec = (
        None,  # 0
        (
            1,
            TType.STRING,
            "innerIp",
            "UTF8",
            None,
        ),  # 1
        (
            2,
            TType.STRING,
            "outerIp",
            "UTF8",
            None,
        ),  # 2
        (
            3,
            TType.STRING,
            "action",
            "UTF8",
            None,
        ),  # 3
    )

    def __init__(
        self,
        innerIp=None,
        outerIp=None,
        action=None,
    ):
        self.innerIp = innerIp
        self.outerIp = outerIp
        self.action = action

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.innerIp = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.outerIp = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.action = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin("ProxyInfo")
        if self.innerIp is not None:
            oprot.writeFieldBegin("innerIp", TType.STRING, 1)
            oprot.writeString(self.innerIp.encode("utf-8") if sys.version_info[0] == 2 else self.innerIp)
            oprot.writeFieldEnd()
        if self.outerIp is not None:
            oprot.writeFieldBegin("outerIp", TType.STRING, 2)
            oprot.writeString(self.outerIp.encode("utf-8") if sys.version_info[0] == 2 else self.outerIp)
            oprot.writeFieldEnd()
        if self.action is not None:
            oprot.writeFieldBegin("action", TType.STRING, 3)
            oprot.writeString(self.action.encode("utf-8") if sys.version_info[0] == 2 else self.action)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()]
        return "%s(%s)" % (self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class FlushAgentInfo(object):
    """
    Attributes:
     - appId
     - appName
     - companyId
     - ownerQq
     - platId
     - oper
     - proxyList
    """

    thrift_spec = (
        None,  # 0
        (
            1,
            TType.STRING,
            "appId",
            "UTF8",
            None,
        ),  # 1
        (
            2,
            TType.STRING,
            "appName",
            "UTF8",
            None,
        ),  # 2
        (
            3,
            TType.STRING,
            "companyId",
            "UTF8",
            None,
        ),  # 3
        (
            4,
            TType.STRING,
            "ownerQq",
            "UTF8",
            None,
        ),  # 4
        (
            5,
            TType.STRING,
            "platId",
            "UTF8",
            None,
        ),  # 5
        (
            6,
            TType.STRING,
            "oper",
            "UTF8",
            None,
        ),  # 6
        (
            7,
            TType.LIST,
            "proxyList",
            (TType.STRUCT, (ProxyInfo, ProxyInfo.thrift_spec), False),
            None,
        ),  # 7
    )

    def __init__(
        self,
        appId=None,
        appName=None,
        companyId=None,
        ownerQq=None,
        platId=None,
        oper=None,
        proxyList=None,
    ):
        self.appId = appId
        self.appName = appName
        self.companyId = companyId
        self.ownerQq = ownerQq
        self.platId = platId
        self.oper = oper
        self.proxyList = proxyList

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.appId = iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.appName = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.companyId = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.ownerQq = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.platId = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.oper = iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.LIST:
                    self.proxyList = []
                    (_etype67, _size64) = iprot.readListBegin()
                    for _i68 in range(_size64):
                        _elem69 = ProxyInfo()
                        _elem69.read(iprot)
                        self.proxyList.append(_elem69)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin("FlushAgentInfo")
        if self.appId is not None:
            oprot.writeFieldBegin("appId", TType.STRING, 1)
            oprot.writeString(self.appId.encode("utf-8") if sys.version_info[0] == 2 else self.appId)
            oprot.writeFieldEnd()
        if self.appName is not None:
            oprot.writeFieldBegin("appName", TType.STRING, 2)
            oprot.writeString(self.appName.encode("utf-8") if sys.version_info[0] == 2 else self.appName)
            oprot.writeFieldEnd()
        if self.companyId is not None:
            oprot.writeFieldBegin("companyId", TType.STRING, 3)
            oprot.writeString(self.companyId.encode("utf-8") if sys.version_info[0] == 2 else self.companyId)
            oprot.writeFieldEnd()
        if self.ownerQq is not None:
            oprot.writeFieldBegin("ownerQq", TType.STRING, 4)
            oprot.writeString(self.ownerQq.encode("utf-8") if sys.version_info[0] == 2 else self.ownerQq)
            oprot.writeFieldEnd()
        if self.platId is not None:
            oprot.writeFieldBegin("platId", TType.STRING, 5)
            oprot.writeString(self.platId.encode("utf-8") if sys.version_info[0] == 2 else self.platId)
            oprot.writeFieldEnd()
        if self.oper is not None:
            oprot.writeFieldBegin("oper", TType.STRING, 6)
            oprot.writeString(self.oper.encode("utf-8") if sys.version_info[0] == 2 else self.oper)
            oprot.writeFieldEnd()
        if self.proxyList is not None:
            oprot.writeFieldBegin("proxyList", TType.LIST, 7)
            oprot.writeListBegin(TType.STRUCT, len(self.proxyList))
            for iter70 in self.proxyList:
                iter70.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()]
        return "%s(%s)" % (self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class cache_ip_info(object):
    """
    Attributes:
     - gse_composite_id
     - ip
    """

    thrift_spec = (
        None,  # 0
        (
            1,
            TType.STRING,
            "gse_composite_id",
            "UTF8",
            None,
        ),  # 1
        (
            2,
            TType.STRING,
            "ip",
            "UTF8",
            None,
        ),  # 2
    )

    def __init__(
        self,
        gse_composite_id=None,
        ip=None,
    ):
        self.gse_composite_id = gse_composite_id
        self.ip = ip

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.gse_composite_id = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.ip = iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin("cache_ip_info")
        if self.gse_composite_id is not None:
            oprot.writeFieldBegin("gse_composite_id", TType.STRING, 1)
            oprot.writeString(
                self.gse_composite_id.encode("utf-8") if sys.version_info[0] == 2 else self.gse_composite_id
            )
            oprot.writeFieldEnd()
        if self.ip is not None:
            oprot.writeFieldBegin("ip", TType.STRING, 2)
            oprot.writeString(self.ip.encode("utf-8") if sys.version_info[0] == 2 else self.ip)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()]
        return "%s(%s)" % (self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class agent_status_request(object):
    """
    Attributes:
     - hosts
    """

    thrift_spec = (
        None,  # 0
        (
            1,
            TType.LIST,
            "hosts",
            (TType.STRUCT, (cache_ip_info, cache_ip_info.thrift_spec), False),
            None,
        ),  # 1
    )

    def __init__(
        self,
        hosts=None,
    ):
        self.hosts = hosts

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.LIST:
                    self.hosts = []
                    (_etype74, _size71) = iprot.readListBegin()
                    for _i75 in range(_size71):
                        _elem76 = cache_ip_info()
                        _elem76.read(iprot)
                        self.hosts.append(_elem76)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin("agent_status_request")
        if self.hosts is not None:
            oprot.writeFieldBegin("hosts", TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.hosts))
            for iter77 in self.hosts:
                iter77.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()]
        return "%s(%s)" % (self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class agent_status_response(object):
    """
    Attributes:
     - result
     - bk_error_code
     - bk_error_msg
    """

    thrift_spec = (
        None,  # 0
        (
            1,
            TType.MAP,
            "result",
            (TType.STRING, "UTF8", TType.STRING, "UTF8", False),
            None,
        ),  # 1
        (
            2,
            TType.I32,
            "bk_error_code",
            None,
            None,
        ),  # 2
        (
            3,
            TType.STRING,
            "bk_error_msg",
            "UTF8",
            None,
        ),  # 3
    )

    def __init__(
        self,
        result=None,
        bk_error_code=None,
        bk_error_msg=None,
    ):
        self.result = result
        self.bk_error_code = bk_error_code
        self.bk_error_msg = bk_error_msg

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.MAP:
                    self.result = {}
                    (_ktype79, _vtype80, _size78) = iprot.readMapBegin()
                    for _i82 in range(_size78):
                        _key83 = iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                        _val84 = iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                        self.result[_key83] = _val84
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.bk_error_code = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.bk_error_msg = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin("agent_status_response")
        if self.result is not None:
            oprot.writeFieldBegin("result", TType.MAP, 1)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.result))
            for kiter85, viter86 in self.result.items():
                oprot.writeString(kiter85.encode("utf-8") if sys.version_info[0] == 2 else kiter85)
                oprot.writeString(viter86.encode("utf-8") if sys.version_info[0] == 2 else viter86)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.bk_error_code is not None:
            oprot.writeFieldBegin("bk_error_code", TType.I32, 2)
            oprot.writeI32(self.bk_error_code)
            oprot.writeFieldEnd()
        if self.bk_error_msg is not None:
            oprot.writeFieldBegin("bk_error_msg", TType.STRING, 3)
            oprot.writeString(self.bk_error_msg.encode("utf-8") if sys.version_info[0] == 2 else self.bk_error_msg)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()]
        return "%s(%s)" % (self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)
